﻿@import "base";
@import "animation";
@import "fonts";
@import "highlight-code";
@import "mobile_index";

@import "comp/header";

//-----------------------------------------------------

@mixin title{
	color: black;
	font-size: 2.4rem;
	font-family: "Microsoft YaHei UI";
	margin-bottom: 3rem;
}

@mixin clearFloatByAfter{
	&:after{
		display: block;
		content: "";
		clear: both;
	}
}

//-----------------------------------------------------

hr{
	border-bottom: none;
	border-top: solid 1px #DEDEDE;
	margin: 2rem 0;
}

.banner{
	text-align: center;
	padding: 4rem 2rem;
	background-color: #F5F7F9;

	.slogan{
		font-size: 3.2rem;
		font-weight: lighter;
		letter-spacing: 4px;

		.emphasis{
			font-weight: normal;
			margin-right: 0.5em;
		}
	}

	.icon{
		margin-top: 6rem;

		> span{
			font-family: iconfont;
			font-size: 3.2rem;
			margin-left: 2rem;

			&:first-child{
				margin-left: 0;
			}
		}

		.html:before{
			content: "\e600";
		}
		.css:before{
			content: "\e604";
		}
		.js:before{
			content: "\e619";
		}
	}

	.description{
		color: #666666;
		margin-top: 2rem;
		line-height: 2em;
	}
}

.main{
	text-align: center;

	section{
		padding: 6rem 0 4rem;
		border-top: solid 1px #F5F7F9;

		&:first-child{
			border-top: none;
		}
	}
	section > .title{
		@include title;
	}
	section > .content{
		overflow: hidden;
	}
}

.code-samples{
	.content{
		@include clearFloatByAfter;

		.description{
			clear: both;
			color: #999999;
			font-size: 1.4rem;
			margin-top: 2rem;
		}
	}
	.code-sample{
		width: 45%;
		border-radius: 0.3rem;
		box-sizing: border-box;

		&:nth-child(1){
			float: left;
		}
		&:nth-child(2){
			float: right;
		}

		::-webkit-scrollbar-thumb{
			background-color: #0F1D55;
		}

		.code-sample-title{
			color: #666666;
			font-size: 1.4rem;
			margin-bottom: 1.2rem;
		}
		.code-block{
			white-space: pre;
			font-family: "Source Code Pro", Consolas, Menlo, Monaco, Courier, monospace;
			font-size: 1.4rem;
			overflow: auto;
			color: #E6ECF1;
			padding: 2.4rem;
			text-align: left;
			border-radius: 0.3rem;
			background-color: #183055;
		}
	}
}

.download{
	.content-holder{
		position: relative;
		display: inline-block;
	}
	.latest-version{
		position: relative;
		color: black;
		padding: 0.6rem 0;
		border-bottom: solid 1px black;

		&:before{
			font-family: iconfont;
			content: "\e68d";
			margin-right: 1rem;
		}

		&:after{
			opacity: 0;
			position: absolute;
			font-family: iconfont;
			content: "\e601";
			right: 100%;
			top: 50%;
			margin-top: -0.5em;
			margin-right: 1rem;
			line-height: 1em;
		}

		&:hover:after{
			animation: slideDown linear 1.5s infinite;
		}
	}
	.other-releases{
		position: absolute;
		left: 100%;
		margin-left: 2em;
		color: #999999;
		white-space: nowrap;
		transition: color linear 0.1s;

		&:hover{
			color: currentColor;
		}
	}
}

.doc{
	.navigation{
		margin-right: -2rem;
		@include clearFloatByAfter;
	}

	.navigation > a{
		float: left;
		display: block;
		position: relative;
		width: 25%;
		padding-right: 2rem;
		box-sizing: border-box;

		.wrapper{
			position: relative;
			padding: 2rem;
			color: #999999;
			font-size: 1.4rem;
			text-align: left;
			border-radius: 3px;
			border: solid 1px #E6ECF1;
			transition: border-color linear 0.1s;

			&:hover{
				border-color: #183055;
			}
		}

		.title{
			display: block;
			@include title;
			margin-bottom: 1.6rem;
		}
	}
}

.copyright{
	padding: 1rem;
	font-size: 1.4rem;
	color: #999999;
	text-align: center;
	
	a{
		text-decoration: underline;
		color: #5ac0ba;
	}
}